<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-form ref="form" :model="t_code" :rules="rules" label-width="100px" id="mvcfm"> 退货类型 <el-select v-model="t_code.stock_type">
        <el-option label="－－无－－" value='' />
        <el-option v-for="dict in s_inout" :key="dict.__code" :label="dict.__desc" :value="dict.__code"></el-option>
      </el-select> 退货单号 {{t_code.bar}} 退货日期 {{getDateTimeString(t_code,'gettime')}} 操作人 {{t_code.contact_name}}
      <div>
      </div>
      <el-button @click="gotoPage('/psi/supplychainmana/ReturnList?'+vueparams+'')" type='primary' size="mini">退货</el-button>
      <div class="form-unit">
        <span class="mvc-title-left"> 退货列表 </span>
      </div>
      <el-table>
        <el-table-column label="退货供应商" prop="">
        </el-table-column>
        <el-table-column label="退货产品" prop="">
        </el-table-column>
        <el-table-column label="规格型号" prop="">
        </el-table-column>
        <el-table-column label="退货数量" prop="">
        </el-table-column>
        <el-table-column label="区域选择" prop="" width="100
">
          <template slot-scope="scope">
            <el-select style='width:100%' v-model="scope.row.hours_id" @change="list_s_layout_item">
              <el-option label="－－无－－" value='' />
              <el-option v-for="dict in s_layout_item" :key="dict.__code" :label="dict.__desc" :value="dict.__code"></el-option>
            </el-select>
          </template>
        </el-table-column>
        <el-table-column label="排号" prop="">
          <template slot-scope="scope">
            <el-select style='width:100%' v-model="scope.row.district_line">
              <el-option label="－－无－－" value='' />
              <el-option v-for="dict in s_empty" :key="dict.__code" :label="dict.__desc" :value="dict.__code"></el-option>
            </el-select>
          </template>
        </el-table-column>
        <el-table-column label="列号" prop="">
          <template slot-scope="scope">
            <el-select style='width:100%' v-model="scope.row.district_row">
              <el-option label="－－无－－" value='' />
              <el-option v-for="dict in s_empty" :key="dict.__code" :label="dict.__desc" :value="dict.__code"></el-option>
            </el-select>
          </template>
        </el-table-column>
        <el-table-column label="格号" prop="">
          <template slot-scope="scope">
            <el-select style='width:100%' v-model="scope.row.district_rack">
              <el-option label="－－无－－" value='' />
              <el-option v-for="dict in s_empty" :key="dict.__code" :label="dict.__desc" :value="dict.__code"></el-option>
            </el-select>
          </template>
        </el-table-column>
        <el-table-column label="退货原因" prop="">
        </el-table-column>
        <el-table-column label="业务员" prop="">
        </el-table-column>
        <el-table-column label="提交时间" prop="">
        </el-table-column>
        <el-table-column label="审批人" prop="">
        </el-table-column>
        <el-table-column label="审批时间" prop="">
        </el-table-column>
      </el-table>
    </el-form>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'ReturnListPro',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        t_code: {
          stock_type: null,
          bar: null,
          gettime: null,
          contact_name: null,
        },
        s_inout: [],
        s_layout_item: [],
        s_empty: [],
        s_empty: [],
        s_empty: [],
        loading: false,
        rules: {
          stock_num: [{
            required: true,
            message: "退货单号不能为空",
            trigger: 'blur',
          }],
          store_intime: [{
            required: true,
            message: "退货日期不能为空",
            trigger: 'blur',
          }],
        }
      }
    },
    created() {},
    updated() {},
    mounted() {},
    methods: {
      list_s_layout_item(value) {
        request({
          method: 'get',
          params: {
            htmltable: '',
            cfield_name: "district_rack,district_line,district_row",
            hours_id: value
          }
        }).then(data => {
          this.s_empty = data['district_rack'];
          this.s_empty = data['district_line'];
          this.s_empty = data['district_row'];
        })
      },
    },
  }
</script>
